<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-href="main"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active" ng-bind="title"></li>
        <a style="float: right;margin-right: 12%;margin-top: -10px;" 
			has-permission permission='funScenes.route.add'	ui-sref="main.funScenes.route.create" class="btn btn-sm btn-info">
			<i class="icon-tag m-r-sm text-md"></i>添加路线</a>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-body">
				<form ng-submit="search()" class="form-horizontal">
                   	<div class="form-group">
                   		
                   		<div class="col-sm-2">
                           	<input type="text" class="form-control" placeholder="请输入路线名称" ng-model="param.routeName">
                       	</div>
                   		
                   		<div class="col-sm-2">
                           	<select class="form-control" ng-model="param.status">
                           		<option value="">--全部--</option>
                       			<option value="0">新路线</option>
                       			<option value="1">使用中</option>
                       		</select>
                       	</div>
                       	
                       	<div class="col-md-6">
                            <label class="col-sm-2"><button class="ifc-btn btn-primary" type="submit">查 询</button></label>
                            <label class="col-sm-2"><button class="ifc-btn btn-dark" type="button" ng-click="clearSearch()">重  置</button></label>
                        </div>
                   	</div>
				</form>
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                        <th>序号</th>
<!--                         <th>ID</th> -->
                        <th>路线名称</th>
                        <th>最大参赛队伍数</th>
<!--                         <th>当前参赛队伍数</th> -->
                        <th>最大参赛人数</th>
<!--                         <th>当前参赛人数</th> -->
						<th>备注</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.records">
                        <td class="v-middle">{{$index + 1}}</td>
<!--                         <td class="v-middle">{{item.id}}</td> -->
                        <td class="v-middle" title="{{item.routeName}}">{{item.routeName}}</td>
                        <td class="v-middle">{{item.maxNum}}</td>
<!--                         <td class="v-middle">{{item.curNum}}</td> -->
                        <td class="v-middle">{{item.maxPeopleNum}}</td>
                        <td class="v-middle">{{item.remark}}</td>
<!--                         <td class="v-middle">{{item.curPeopleNum}}</td> -->
                        <td class="v-middle">
                            <span ng-if="item.status==1">使用中</span>
                            <span ng-if="item.status==0">新路线</span>
                        </td>
                        
                        <td class="v-middle">
<!--                         	<a ui-sref="main.funScenes.route.detail({id: item.routeId})" class="btn btn-sm btn-default"> -->
<!--                                 <i class="fa fa-edit m-r-xs text-sm"></i>详情</a> -->
                            <a ng-if="item.status==0" ui-sref="main.funScenes.route.update({id: item.id})" class="btn btn-sm btn-default">
                                <i class="fa fa-edit m-r-xs text-sm"></i>修改</a>
                            <button type="button"  ng-if="item.status==0" ng-click="delRoute(item.id)" class="btn btn-sm btn-default m-l-xs">
                                <i class="fa fa-ban m-r-xs text-sm"></i>删除</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->
            <!-- 底部分页 -->
			<span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->
</div><!-- /.wrapper-md -->